<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<base href="<%=basePath%>">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公告</title>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="bootstrap/css/bootstrap1.min.css" rel="stylesheet">
<link href="css/style1.css" rel="stylesheet">
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
.page a.on{background:#08c;color:#fff;}
</style>
</head>

<body>
	<%@include file="common/Top.jsp"%>
	<div class="container" style="margin-top: 10px;">
	<div class="row">
		<div class="span1"></div>
		<div class="span10">
		<div style="height: 60%">
			<table class="table table-hover table-striped" style="margin-top: 20px;">
				<thead>
					<tr>
						<th style="width: 80%;font-weight: normal;">
							标题
						</th>
						<th style="font-weight: normal;">
							发布时间
						</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="noticeList">
						<tr style="cursor: pointer;" onclick="goContent(<s:property value="id"/>)">
							<td style="width: 80%;">
								<s:property value="title"/>
							</td>
							<td>
								<c:formatDate value="${date }" pattern="MM/dd/YYYY"/>
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			</div>
			<div class="pagination pagination-centered">
				<ul>
					<li>
						<s:if test="vo.pageCurrent==1">
							<a href="#" onclick="return false">上一页</a>
						</s:if>
						<s:else>
							<a href="notice.action?page=<s:property value="vo.pageCurrent-1"/>">上一页</a>
						</s:else>
					</li>
					<s:bean name="org.apache.struts2.util.Counter">
					<s:param name="first" value="1" />
					<s:param name="last" value="vo.pageCount" />
					<s:iterator>
						<li>
							<a href="notice.action?page=<s:property />" onclick="this.backgroundColor='#999'"><s:property /></a>
						</li>
					</s:iterator>
					</s:bean>
					<li>
						<s:if test="vo.pageCurrent==vo.pageCount">
							<a href="#" onclick="return false">下一页</a>
						</s:if>
						<s:else>
							<a href="notice.action?page=<s:property value="vo.pageCurrent+1"/>">下一页</a>
						</s:else>
					</li>
				</ul>
			</div>
		</div>
		<div class="span1"></div>
		
	</div>
</div>
	<%@include file="common/Bottom.jsp"%>
	<script type="text/javascript">
		function goContent(id){
			window.location.href="concent.action?notice.id="+id;
		};
	</script>
	<script src="backadmin/js/jquery-1.10.2.min.js"></script> 
	<script src="bootstrap/js/bootstrap.js"></script>
</body>
</html>
